﻿using LuShanTea.DTO;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;

namespace LuShanTea.Admin.Web.Models
{
    public class AdminUserAddSubModel
    {
        /// <summary>
        /// 管理员真实姓名
        /// </summary>
        [Required]
        [StringLength(32)]
        [RegularExpression(@"^[\u4e00-\u9fa5]+$")]
        public string Name { get; set; }
        /// <summary>
        /// 管理员昵称
        /// </summary>
        [Required]
        [StringLength(32)]
        [RegularExpression(@"^[\u4e00-\u9fa5]+$")]
        public string NickName { get; set; }
        /// <summary>
        /// 管理员手机号
        /// </summary>
        [Required]
        [Phone]
        public string PhoneNum { get; set; }
        /// <summary>
        /// 邮箱
        /// </summary>
        [Required]
        [EmailAddress]
        public string Email { get; set; }

        [Required]
        [StringLength(16)]
        public string PassWord { get; set; }

        /// <summary>
        /// 用户头像地址
        /// </summary>
        [StringLength(128)]
        public string ImgSrc { get; set; }
        /// <summary>
        /// 性别
        /// </summary>
        [Required]
        public bool Gender { get; set; }

        [Required]
        public long[] Roles { get; set; } = new long[] { };
    }
}